Inheritance diagram for TMCCountedPtrArray< T >:

Public Types | |
| typedef TMCPtrIterator< T, TMCCountedPtrArray< T > > | iterator |
| typedef TMCConstPtrIterator< T, TMCCountedPtrArray< T > > | const_iterator |
Public Member Functions | |
| TMCCountedPtrArray (void) | |
| TMCCountedPtrArray (uint32 initialCount) | |
| TMCCountedPtrArray (uint32 initialCount, uint32 initialSpace, uint32 initialGrowSize) | |
| TMCCountedPtrArray (const TMCCountedPtrArray< T > &inFromArray) | |
| TMCCountedPtrArray (const TMCPtrArray< T > &inFromPtrArray) | |
| TMCCountedPtrArray (T **const &baseAddress, boolean inAquireMemory, uint32 elemCount, uint32 elemSpace) | |
| TMCCountedPtrArray (TMCCountedPtrArray< T > &array, uint32 elemStart, uint32 elemCount) | |
| ~TMCCountedPtrArray (void) | |
| boolean | ArrayAlloc (uint32 initialCount, uint32 initialSpace, uint32 initialGrowSize) |
| boolean | ArrayAllocFromBuffer (T **baseAddress, boolean inAquireMemory, uint32 elemCount, uint32 elemSpace) |
| void | ArrayFree (void) |
| boolean | IsValid (void) const |
| int8 * | BaseAddress (void) |
| const int8 * | BaseAddress (void) const |
| uint32 | GetElemSize (void) const |
| uint32 | GetGrowSize (void) const |
| uint32 | GetElemSpace (void) const |
| uint32 | GetElemCount (void) const |
| boolean | ExternalMemory () |
| boolean | GetSmartGrow (void) const |
| T ** | ArrayData (void) |
| T **const | ArrayData (void) const |
| void | SetValid (boolean valid) |
| void | SetGrowSize (uint32 g) |
| void | SetSmartGrow () |
| boolean | SetElemSpace (uint32 n) |
| boolean | SetElemCount (uint32 n) |
| boolean | AddElemCount (uint32 n) |
| const_iterator | Begin (void) const |
| iterator | Begin (void) |
| const_iterator | End (void) const |
| iterator | End (void) |
| void | FirstElem (T **data) |
| T * | FirstElemNoAddRef (void) |
| const T * | FirstElemNoAddRef (void) const |
| void | LastElem (T **data) |
| T * | LastElemNoAddRef (void) |
| const T * | LastElemNoAddRef (void) const |
| void | Erase (const iterator &elementToErase) |
| void | Erase (const iterator &start, const iterator &end) |
| boolean | CopyElems (const TMCCountedPtrArray< T > &fromArray, uint32 startIndex, uint32 nbItems, uint32 insertIndex) |
| boolean | Append (const TMCCountedPtrArray< T > &fromArray) |
| TMCCountedPtrArray< T > & | operator= (const TMCCountedPtrArray< T > &fromArray) |
| TMCCountedPtrArray< T > & | operator= (const TMCPtrArray< T > &fromPtrArray) |
| T * | operator[] (uint32 i) |
| T * | operator[] (uint32 i) const |
| boolean | SetElem (uint32 index, T *data) |
| boolean | GetElem (uint32 index, T **data) const |
| boolean | AddElem (T *data) |
| boolean | InsertElem (uint32 index, T *data) |
| boolean | RemoveElem (uint32 index, uint32 count) |
| void | RemoveElem (T *elemToRemove) |
| boolean | CompactArray (void) |
| uint32 | FindElem (const T *item) const |
| void | CheckLastRefs () |
| T ** | Pointer (uint32 i) |
| const T ** | Pointer (uint32 i) const |
Protected Member Functions | |
| void | UpdateDataPointer (void) |
| void | ZeroInternals (void) |
Protected Attributes | |
| friend | iterator |
| friend | const_iterator |
| uint32 | fElemCount |
| The number of elements in use. | |
| uint32 | fElemSpace |
| The number of elements allocated (unconstructed). | |
| uint32 | fArrayFlags |
| Flags that control the behavior of the array. | |
| T ** | fArrayData |
| The memory block used by the array. | |
Indexes to access the Array classes are ZERO based (array[0] gives you the first element)
Arrays grows dynamically as you add elements. For better efficiency, preallocate the number of elements you'll need (or use an estimation of the space if possible).
In eSmartGrow mode (the default), the size of the extra space added when the array is reallocated (the grow size) depends on the number of elements already in the array. Otherwise, a constant grow size is used.
Other array classes are: TMCArray, TMCPtrArray, TMCClassArray and TMCExtensibleArray.
|
|||||
|
Declare iterator types for this array |
|
|||||
|
Declare iterator types for this array |
|
||||||||||
|
Creates an empty array |
|
||||||||||
|
Constructs an array with a certain number of elements already accessible (and initialized to NULL).
|
|
||||||||||||||||||||
|
Constructs an array with a certain number of elements already accessible (and constructed), and/or some extra space to extend the array without reallocating it.
|
|
||||||||||
|
Copy constructor: Construct an array from an existing array. |
|
||||||||||
|
Copy constructor: Construct an array from an existing array. |
|
||||||||||||||||||||||||
|
Constructs an array from existing memory.
|
|
||||||||||||||||||||
|
Constructs an alias to an existing array.
|
|
||||||||||
|
Releases all the elements of the array and frees the memory (if the array owns it). |
|
||||||||||
|
Add an element to the end of the array and assign it the data reference that is passed in. |
|
||||||||||
|
Add the passed in number of elemens to the array. |
|
||||||||||
|
Append one array on to the end of another. |
|
||||||||||||||||||||
|
!!! DO NOT CALL THIS !!! |
|
||||||||||||||||||||||||
|
!!! DO NOT CALL THIS !!! |
|
||||||||||
|
Returns a pointer to the first element |
|
||||||||||
|
Returns a pointer to the first element |
|
||||||||||
|
Releases all the elements of the array and frees the memory (if the array owns it) And sets the element count to 0. |
|
||||||||||
|
Returns the address at which the elements of the array begin |
|
||||||||||
|
Returns the address at which the elements of the array begin |
|
||||||||||
|
Returns a reference to the begining iterator for the array. |
|
||||||||||
|
Returns a reference to the begining iterator for the array. |
|
|||||||||
|
In debug, verifies that the refcount of every object in the array is 1 (ie they'll be deleted when the array is destroyed) |
|
||||||||||
|
Gets rid of any space that has been allocated to the array and isn't being used. |
|
||||||||||||||||||||||||
|
Copy elements from one array to another. |
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||||
|
Erases a range of elements in the array from the startIterator to the endIterator. |
|
||||||||||
|
Erases a single element in the array that is referenced by the iterator. |
|
|||||||||
|
Returns true if the array doesn't own its memory |
|
||||||||||
|
Finds the index in this array of the given element
|
|
||||||||||
|
Returns the first element in the array (addrefs it). |
|
||||||||||
|
Returns the first element in the array (without calling addref on it). |
|
||||||||||
|
Returns the first element in the array (without calling addref on it). |
|
||||||||||||||||
|
Get the contents of arrray index into the passed in data reference. |
|
||||||||||
|
Returns the actual number of (valid) elements in the array. Those elements can be accessed with the operator [] |
|
||||||||||
|
Returns the size of one element (sizeof(T*)) |
|
||||||||||
|
Returns the number of elements that can be stored in the array (before the next reallocation) |
|
||||||||||
|
Returns the size by which the array grows |
|
||||||||||
|
Returns true if the grow size is dynamic |
|
||||||||||||||||
|
Inserts one element at the given index
|
|
||||||||||
|
IsValid(): Check to see if the class is valid. |
|
||||||||||
|
|
|
||||||||||
|
Returns the last element in the array (without calling addref on it). |
|
||||||||||
|
Returns the last element in the array (without calling addref on it). |
|
||||||||||
|
operator=: Assignment operator copies all the data from one array to another. |
|
||||||||||
|
operator=: Assignment operator copies all the data from one array to another. |
|
||||||||||
|
Returns the data at the passed in index.
|
|
||||||||||
|
Returns the data at the passed in index.
|
|
||||||||||
|
Returns a pointer to the data at the passed in index. |
|
||||||||||
|
Returns a pointer to the data at the passed in index. |
|
||||||||||
|
Removes one element from the array starting from the passed in index. |
|
||||||||||||||||
|
Removes one or more elements from the array starting from the passed in index. Reimplemented in TTimeBasedList. |
|
||||||||||||||||
|
Set the contents of arrray index to the passed in data reference. |
|
||||||||||
|
Set the number of elements in the array. |
|
||||||||||
|
Set the number of elements to have memory allocated for.
|
|
||||||||||
|
Sets the growSize (and sets the eSmartGrow flag to false) |
|
|||||||||
|
Sets the eSmartGrow flag and computes the maximum grow size (in elements count) |
|
||||||||||
|
Sets the valid flag to true |
|
||||||||||
|
|
|
||||||||||
|
|
|
|||||
|
|
|
|||||
|
The memory block used by the array.
|
|
|||||
|
Flags that control the behavior of the array.
|
|
|||||
|
The number of elements in use.
|
|
|||||
|
The number of elements allocated (unconstructed).
|
|
|||||
|
|
1.4.5